function responseData(ctx, data) {
  if (data?.message) {
    ctx.response.status = 400;
    ctx.response.body = {
      code: 0,
      msg: data.message,
      data: null,
    };
  } else {
    ctx.response.body = {
      code: 1,
      msg: "updateUser",
      data,
    };
  }
}

module.exports = responseData;
